package cn.com.Enum;

import org.apache.commons.lang.StringUtils;

/**
 * Created with IntelliJ IDEA.
 * User: yue
 * Date: 2018-03-27
 * Time: 22:48
 * Description:
 */
public enum UserClientId {

    USER("5a97ede6f8635a00018551a1"),
    ADMIN("5a97edd5f8635a00018551a0"),
    SELLER("5a97edfbf8635a00018551a2");

    private String id;

    private UserClientId(String id){
        this.id=id;
    }

    public String getId(){
        return id;
    }

    public static UserClientId getEnum(String id){
        if (StringUtils.isBlank(id)){
            return null;
        }
        for (UserClientId userClientId:UserClientId.values()){
            if (userClientId.id.equals(id)){
                return userClientId;
            }
        }
        return null;
    }
}
